#pragma once

#include "IComponent.h"
#include "Pathfinder.h"

class PathfinderComponent : public IComponent
{
public:
	static const HashedString type;
	
	PathfinderComponent( Entity* parent );
	PathfinderComponent( PathfinderComponent& o );
	virtual ~PathfinderComponent();

	const HashedString& Type();
	std::string ToString() const;
	bool ToXML( tinyxml2::XMLPrinter& printer );
	
	void setWaypoints( std::string waypointName, Pathing::Waypoint::Vector_t& waypoints );
	Subject<Maths::Vector3D>& getPosition();
	void BindTo( Subject<Maths::Vector3D>& location );
protected:
	std::string m_waypointListName;
	Pointer<TriggerBase> m_position;
	Pointer<Pathing::Pathfinder> m_pathfinder;
};